package SimlpePublish

import (
	"encoding/json"
	"fmt"
	"kill/common/rabbitMQ/rabbitMq"
)

func SendToMq(data interface{}) {
	rabbitmq := rabbitMq.NewRabbitMQSimple("" +
		"kuteng")
	marshal, err := json.Marshal(&data)
	if err != nil {
		panic(err)
		return
	}
	rabbitmq.PublishSimple(string(marshal))
	fmt.Println("发送成功！")
}
